$(document).ready(function() {
	
	//开场第一屏动画开始
	
	setTimeout(function() {
		
		$(".section1 .zss_hengline").addClass("helinadd");
		
		$('.zss_sec2cpbox').css({"transform":"scale(1)","-webkit-transform":"scale(1)","-moz-transform":"scale(1)","-ms-transform":"scale(1)"})
		
	}, 100);
	
	//开场第一屏动画结束
	
	$(".dowebok").fullpage({

		slidesColor: ['#FFFEF2', 'white', '#FFFEF2'],

		verticalCentered: true,

		anchors: ['page1', 'page2', 'page3'],

		menu: '#zss_nav',

		//paddingTop: '3rem',

		scrollingSpeed: 600,

		easing: "easeOutCubic",

		navigation: true,

		css3: true,

		afterLoad: function(anchorLink, index) {
			
			
			if(index == 1) {
				
				$(".section1 .zss_hengline").addClass("helinadd");
				
				$('.zss_sec2cpbox').css({"transform":"scale(1)","-webkit-transform":"scale(1)","-moz-transform":"scale(1)","-ms-transform":"scale(1)"})
					

			}

			if(index == 2) {
				
				$(".section2 .zss_hengline").addClass("helinadd");
				
				$('.section2 .zss_shishtext').animate({

					top: '0'

				}, 1300, 'easeOutExpo');
				
				$('.zss_jfimg img').delay(200).animate({

					top: '0'

				}, 1300, 'easeOutExpo');
				
				
				
			}

			if(index == 3) {
				
				$(".section3 .zss_hengline").addClass("helinadd");
				
				$('.zss_xzq3,.zss_sec4miaoshu').animate({

					left: '0'

				}, 1200, 'easeOutExpo');

			}
			
		},

		onLeave: function(index, direction) {
			

			if(index == '1') {
				
				$(".section1 .zss_hengline").removeClass("helinadd");
				
				setTimeout(function(){
					$('.zss_sec2cpbox').css({"transform":"scale(0)","-webkit-transform":"scale(0)","-moz-transform":"scale(0)","-ms-transform":"scale(0)"})
				},500)
			}

			if(index == '2') {
				
				$(".section2 .zss_hengline").removeClass("helinadd");
				
				$('.section2 .zss_shishtext').delay(300).animate({

					top: '100rem'

				}, 1, 'easeOutExpo');
				
				$('.zss_jfimg img').delay(500).animate({

					top: '100rem'

				}, 1, 'easeOutExpo');

			}

			if(index == '3') {
				
				$(".section3 .zss_hengline").removeClass("helinadd");
				
				$('.zss_sec4miaoshu').delay(500).animate({

					left: '-100rem'

				}, 1, 'easeOutExpo');
				
				$('.zss_xzq3').delay(500).animate({

					left: '100rem'

				}, 1, 'easeOutExpo');

			}
			
		}

	});


	
});